package cn.anquing.controller;

import cn.anquing.model.Girl;
import cn.anquing.service.GirlService;
import cn.anquing.vo.Response;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * Created by Administrator on 2017/6/28 0028.
 */
@Controller
public class GirlController extends BaseController{

    @Autowired
    private GirlService girlService;

    @RequestMapping(value="/girl/{id}",method = RequestMethod.GET)
    @ResponseBody
    public Response getGirl(@PathVariable("id") Integer id){
        Girl girl = girlService.selectOne(new EntityWrapper<Girl>().eq("id", id));
        return success(girl);
    }

}
